home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Networking / TPIFile / TPIFile.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  1.3 KB  |  49 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        TPIFile.h
  3.  
  4.     Contains:    Interface to the TPI Module to access File Manager files.
  5.                 Technology demonstration only!
  6.  
  7.     Written by:    Quinn "The Eskimo!"
  8.  
  9.     Copyright:    © 1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.     Change History (most recent first):
  12.  
  13.     You may incorporate this sample code into your applications without
  14.     restriction, though the sample code has been provided "AS IS" and the
  15.     responsibility for its operation is 100% yours.  However, what you are
  16.     not permitted to do is to redistribute the source as "DSC Sample Code"
  17.     after having made changes. If you're going to re-distribute the source,
  18.     we require that you make it clear in the source that the code was
  19.     descended from Apple Sample Code, but that you've made changes.
  20. */
  21.  
  22. #include <Files.h>
  23. #include <OpenTransport.h>
  24.  
  25. enum {
  26.     AF_FILESPEC = 666            // FSSpec
  27. };
  28.  
  29. struct FileSpecAddress {
  30.     OTAddressType    fAddressType;        // Use AF_FILESPEC to denote this format.
  31.     FSSpec            fss;
  32. };
  33. typedef struct FileSpecAddress FileSpecAddress, *FileSpecAddressPtr;
  34.  
  35. struct TPIFilePortInfoRecord {
  36.     OSType         magic1;
  37.     OTPortRef    portRef;
  38.     OSType         magic2;
  39. };
  40. typedef struct TPIFilePortInfoRecord TPIFilePortInfoRecord, *TPIFilePortInfoRecordPtr;
  41.  
  42. enum {
  43.     kTPIFilePerStreamDataMagic = 'ESK0',
  44.     kTPIFilePortInfoMagic1 = 'ESK1',
  45.     kTPIFilePortInfoMagic2 = 'ESK2'
  46. };
  47.  
  48. #define kTPIFilePortName "TPIFile"
  49.